//
//  WarningViewModel.m
//  MDC
//
//  Created by 123456 on 16/7/14.
//  Copyright © 2016年 YTYangK. All rights reserved.
//

#import "WarningViewModel.h"

@implementation WarningViewModel



#pragma mark - 设置报警时间
+ (void)requestWithUrlForWarning:(id)obj  andParam:(NSDictionary *)param success:(void(^)(WarningModel * model))success failure:(void(^)(NSString * error))failure
{
    
    MDC_INTER_DIC(@"alarm/alarmSet.asp", @"NetMethodPOST", @"false")
    
    [super initRequestWithUrlObj:obj parametersDic:param Interface:inter success:^(id obj, id model) {
        if (model) {
            WarningModel *list = [WarningModel mj_objectWithKeyValues:model[@"body"]];
            success(list);
            return;
        }else {
            failure(@"设置失败");
        }
    } failure:^(id obj, NSString *err) {
          [MBProgressHUD showError:err]; //返回是因为需要列表拉下来
    }];

    
}




@end
